﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace KSS.Generator.Configuration
{
    internal class ProjectSettingConverter : ExpandableObjectConverter
    {
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == typeof(string) && value is ProjectSetting)
            {
                return ((ProjectSetting)value).Name;
            }

            return base.ConvertTo(context, culture, value, destinationType);
        }
    }
}
